| OLD | NEW |
| 1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 | 2 |
| 3 library googleapis_beta.datastore.v1beta2; | 3 library googleapis_beta.datastore.v1beta2; |
| 4 | 4 |
| 5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
| 6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
| 7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
| 8 | 8 |
| 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 10 import 'package:crypto/crypto.dart' as crypto; | |
| 11 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
| 12 | 11 |
| 13 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
| 14 ApiRequestError, DetailedApiRequestError; | 13 ApiRequestError, DetailedApiRequestError; |
| 15 | 14 |
| 16 const core.String USER_AGENT = 'dart-api-client datastore/v1beta2'; | 15 const core.String USER_AGENT = 'dart-api-client datastore/v1beta2'; |
| 17 | 16 |
| 18 /** Stores and queries data in Google Cloud Datastore. */ | 17 /** Stores and queries data in Google Cloud Datastore. */ |
| 19 class DatastoreApi { | 18 class DatastoreApi { |
| 20 /** View and manage your data across Google Cloud Platform services */ | 19 /** View and manage your data across Google Cloud Platform services */ |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 } | 395 } |
| 397 return _json; | 396 return _json; |
| 398 } | 397 } |
| 399 } | 398 } |
| 400 | 399 |
| 401 class BeginTransactionResponse { | 400 class BeginTransactionResponse { |
| 402 ResponseHeader header; | 401 ResponseHeader header; |
| 403 /** The transaction identifier (always present). */ | 402 /** The transaction identifier (always present). */ |
| 404 core.String transaction; | 403 core.String transaction; |
| 405 core.List<core.int> get transactionAsBytes { | 404 core.List<core.int> get transactionAsBytes { |
| 406 return crypto.CryptoUtils.base64StringToBytes(transaction); | 405 return convert.BASE64.decode(transaction); |
| 407 } | 406 } |
| 408 | 407 |
| 409 void set transactionAsBytes(core.List<core.int> _bytes) { | 408 void set transactionAsBytes(core.List<core.int> _bytes) { |
| 410 transaction = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); | 409 transaction = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll(
"+", "-"); |
| 411 } | 410 } |
| 412 | 411 |
| 413 BeginTransactionResponse(); | 412 BeginTransactionResponse(); |
| 414 | 413 |
| 415 BeginTransactionResponse.fromJson(core.Map _json) { | 414 BeginTransactionResponse.fromJson(core.Map _json) { |
| 416 if (_json.containsKey("header")) { | 415 if (_json.containsKey("header")) { |
| 417 header = new ResponseHeader.fromJson(_json["header"]); | 416 header = new ResponseHeader.fromJson(_json["header"]); |
| 418 } | 417 } |
| 419 if (_json.containsKey("transaction")) { | 418 if (_json.containsKey("transaction")) { |
| 420 transaction = _json["transaction"]; | 419 transaction = _json["transaction"]; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 443 */ | 442 */ |
| 444 core.String mode; | 443 core.String mode; |
| 445 /** The mutation to perform. Optional. */ | 444 /** The mutation to perform. Optional. */ |
| 446 Mutation mutation; | 445 Mutation mutation; |
| 447 /** | 446 /** |
| 448 * The transaction identifier, returned by a call to beginTransaction. Must be | 447 * The transaction identifier, returned by a call to beginTransaction. Must be |
| 449 * set when mode is TRANSACTIONAL. | 448 * set when mode is TRANSACTIONAL. |
| 450 */ | 449 */ |
| 451 core.String transaction; | 450 core.String transaction; |
| 452 core.List<core.int> get transactionAsBytes { | 451 core.List<core.int> get transactionAsBytes { |
| 453 return crypto.CryptoUtils.base64StringToBytes(transaction); | 452 return convert.BASE64.decode(transaction); |
| 454 } | 453 } |
| 455 | 454 |
| 456 void set transactionAsBytes(core.List<core.int> _bytes) { | 455 void set transactionAsBytes(core.List<core.int> _bytes) { |
| 457 transaction = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); | 456 transaction = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll(
"+", "-"); |
| 458 } | 457 } |
| 459 | 458 |
| 460 CommitRequest(); | 459 CommitRequest(); |
| 461 | 460 |
| 462 CommitRequest.fromJson(core.Map _json) { | 461 CommitRequest.fromJson(core.Map _json) { |
| 463 if (_json.containsKey("ignoreReadOnly")) { | 462 if (_json.containsKey("ignoreReadOnly")) { |
| 464 ignoreReadOnly = _json["ignoreReadOnly"]; | 463 ignoreReadOnly = _json["ignoreReadOnly"]; |
| 465 } | 464 } |
| 466 if (_json.containsKey("mode")) { | 465 if (_json.containsKey("mode")) { |
| 467 mode = _json["mode"]; | 466 mode = _json["mode"]; |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 699 _json["queryString"] = queryString; | 698 _json["queryString"] = queryString; |
| 700 } | 699 } |
| 701 return _json; | 700 return _json; |
| 702 } | 701 } |
| 703 } | 702 } |
| 704 | 703 |
| 705 /** A binding argument for a GQL query. */ | 704 /** A binding argument for a GQL query. */ |
| 706 class GqlQueryArg { | 705 class GqlQueryArg { |
| 707 core.String cursor; | 706 core.String cursor; |
| 708 core.List<core.int> get cursorAsBytes { | 707 core.List<core.int> get cursorAsBytes { |
| 709 return crypto.CryptoUtils.base64StringToBytes(cursor); | 708 return convert.BASE64.decode(cursor); |
| 710 } | 709 } |
| 711 | 710 |
| 712 void set cursorAsBytes(core.List<core.int> _bytes) { | 711 void set cursorAsBytes(core.List<core.int> _bytes) { |
| 713 cursor = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); | 712 cursor = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+",
"-"); |
| 714 } | 713 } |
| 715 /** | 714 /** |
| 716 * Must match regex "[A-Za-z_$][A-Za-z_$0-9]*". Must not match regex "__.*__". | 715 * Must match regex "[A-Za-z_$][A-Za-z_$0-9]*". Must not match regex "__.*__". |
| 717 * Must not be "". | 716 * Must not be "". |
| 718 */ | 717 */ |
| 719 core.String name; | 718 core.String name; |
| 720 Value value; | 719 Value value; |
| 721 | 720 |
| 722 GqlQueryArg(); | 721 GqlQueryArg(); |
| 723 | 722 |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1090 /** An entity property. */ | 1089 /** An entity property. */ |
| 1091 class Property { | 1090 class Property { |
| 1092 /** A blob key value. */ | 1091 /** A blob key value. */ |
| 1093 core.String blobKeyValue; | 1092 core.String blobKeyValue; |
| 1094 /** | 1093 /** |
| 1095 * A blob value. May be a maximum of 1,000,000 bytes. When indexed is true, | 1094 * A blob value. May be a maximum of 1,000,000 bytes. When indexed is true, |
| 1096 * may have at most 500 bytes. | 1095 * may have at most 500 bytes. |
| 1097 */ | 1096 */ |
| 1098 core.String blobValue; | 1097 core.String blobValue; |
| 1099 core.List<core.int> get blobValueAsBytes { | 1098 core.List<core.int> get blobValueAsBytes { |
| 1100 return crypto.CryptoUtils.base64StringToBytes(blobValue); | 1099 return convert.BASE64.decode(blobValue); |
| 1101 } | 1100 } |
| 1102 | 1101 |
| 1103 void set blobValueAsBytes(core.List<core.int> _bytes) { | 1102 void set blobValueAsBytes(core.List<core.int> _bytes) { |
| 1104 blobValue = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); | 1103 blobValue = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+
", "-"); |
| 1105 } | 1104 } |
| 1106 /** A boolean value. */ | 1105 /** A boolean value. */ |
| 1107 core.bool booleanValue; | 1106 core.bool booleanValue; |
| 1108 /** A timestamp value. */ | 1107 /** A timestamp value. */ |
| 1109 core.DateTime dateTimeValue; | 1108 core.DateTime dateTimeValue; |
| 1110 /** A double value. */ | 1109 /** A double value. */ |
| 1111 core.double doubleValue; | 1110 core.double doubleValue; |
| 1112 /** | 1111 /** |
| 1113 * An entity value. May have no key. May have a key with an incomplete key | 1112 * An entity value. May have no key. May have a key with an incomplete key |
| 1114 * path. May have a reserved/read-only key. | 1113 * path. May have a reserved/read-only key. |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1370 } | 1369 } |
| 1371 | 1370 |
| 1372 /** A query. */ | 1371 /** A query. */ |
| 1373 class Query { | 1372 class Query { |
| 1374 /** | 1373 /** |
| 1375 * An ending point for the query results. Optional. Query cursors are returned | 1374 * An ending point for the query results. Optional. Query cursors are returned |
| 1376 * in query result batches. | 1375 * in query result batches. |
| 1377 */ | 1376 */ |
| 1378 core.String endCursor; | 1377 core.String endCursor; |
| 1379 core.List<core.int> get endCursorAsBytes { | 1378 core.List<core.int> get endCursorAsBytes { |
| 1380 return crypto.CryptoUtils.base64StringToBytes(endCursor); | 1379 return convert.BASE64.decode(endCursor); |
| 1381 } | 1380 } |
| 1382 | 1381 |
| 1383 void set endCursorAsBytes(core.List<core.int> _bytes) { | 1382 void set endCursorAsBytes(core.List<core.int> _bytes) { |
| 1384 endCursor = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); | 1383 endCursor = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+
", "-"); |
| 1385 } | 1384 } |
| 1386 /** The filter to apply (optional). */ | 1385 /** The filter to apply (optional). */ |
| 1387 Filter filter; | 1386 Filter filter; |
| 1388 /** | 1387 /** |
| 1389 * The properties to group by (if empty, no grouping is applied to the result | 1388 * The properties to group by (if empty, no grouping is applied to the result |
| 1390 * set). | 1389 * set). |
| 1391 */ | 1390 */ |
| 1392 core.List<PropertyReference> groupBy; | 1391 core.List<PropertyReference> groupBy; |
| 1393 /** The kinds to query (if empty, returns entities from all kinds). */ | 1392 /** The kinds to query (if empty, returns entities from all kinds). */ |
| 1394 core.List<KindExpression> kinds; | 1393 core.List<KindExpression> kinds; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1407 */ | 1406 */ |
| 1408 core.List<PropertyOrder> order; | 1407 core.List<PropertyOrder> order; |
| 1409 /** The projection to return. If not set the entire entity is returned. */ | 1408 /** The projection to return. If not set the entire entity is returned. */ |
| 1410 core.List<PropertyExpression> projection; | 1409 core.List<PropertyExpression> projection; |
| 1411 /** | 1410 /** |
| 1412 * A starting point for the query results. Optional. Query cursors are | 1411 * A starting point for the query results. Optional. Query cursors are |
| 1413 * returned in query result batches. | 1412 * returned in query result batches. |
| 1414 */ | 1413 */ |
| 1415 core.String startCursor; | 1414 core.String startCursor; |
| 1416 core.List<core.int> get startCursorAsBytes { | 1415 core.List<core.int> get startCursorAsBytes { |
| 1417 return crypto.CryptoUtils.base64StringToBytes(startCursor); | 1416 return convert.BASE64.decode(startCursor); |
| 1418 } | 1417 } |
| 1419 | 1418 |
| 1420 void set startCursorAsBytes(core.List<core.int> _bytes) { | 1419 void set startCursorAsBytes(core.List<core.int> _bytes) { |
| 1421 startCursor = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); | 1420 startCursor = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll(
"+", "-"); |
| 1422 } | 1421 } |
| 1423 | 1422 |
| 1424 Query(); | 1423 Query(); |
| 1425 | 1424 |
| 1426 Query.fromJson(core.Map _json) { | 1425 Query.fromJson(core.Map _json) { |
| 1427 if (_json.containsKey("endCursor")) { | 1426 if (_json.containsKey("endCursor")) { |
| 1428 endCursor = _json["endCursor"]; | 1427 endCursor = _json["endCursor"]; |
| 1429 } | 1428 } |
| 1430 if (_json.containsKey("filter")) { | 1429 if (_json.containsKey("filter")) { |
| 1431 filter = new Filter.fromJson(_json["filter"]); | 1430 filter = new Filter.fromJson(_json["filter"]); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1488 | 1487 |
| 1489 /** A batch of results produced by a query. */ | 1488 /** A batch of results produced by a query. */ |
| 1490 class QueryResultBatch { | 1489 class QueryResultBatch { |
| 1491 /** | 1490 /** |
| 1492 * A cursor that points to the position after the last result in the batch. | 1491 * A cursor that points to the position after the last result in the batch. |
| 1493 * May be absent. TODO(arfuller): Once all plans produce cursors update | 1492 * May be absent. TODO(arfuller): Once all plans produce cursors update |
| 1494 * documentation here. | 1493 * documentation here. |
| 1495 */ | 1494 */ |
| 1496 core.String endCursor; | 1495 core.String endCursor; |
| 1497 core.List<core.int> get endCursorAsBytes { | 1496 core.List<core.int> get endCursorAsBytes { |
| 1498 return crypto.CryptoUtils.base64StringToBytes(endCursor); | 1497 return convert.BASE64.decode(endCursor); |
| 1499 } | 1498 } |
| 1500 | 1499 |
| 1501 void set endCursorAsBytes(core.List<core.int> _bytes) { | 1500 void set endCursorAsBytes(core.List<core.int> _bytes) { |
| 1502 endCursor = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); | 1501 endCursor = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+
", "-"); |
| 1503 } | 1502 } |
| 1504 /** | 1503 /** |
| 1505 * The result type for every entity in entityResults. full for full entities, | 1504 * The result type for every entity in entityResults. full for full entities, |
| 1506 * projection for entities with only projected properties, keyOnly for | 1505 * projection for entities with only projected properties, keyOnly for |
| 1507 * entities with only a key. | 1506 * entities with only a key. |
| 1508 * Possible string values are: | 1507 * Possible string values are: |
| 1509 * - "FULL" | 1508 * - "FULL" |
| 1510 * - "KEY_ONLY" | 1509 * - "KEY_ONLY" |
| 1511 * - "PROJECTION" | 1510 * - "PROJECTION" |
| 1512 */ | 1511 */ |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1574 * Default is default. | 1573 * Default is default. |
| 1575 * Possible string values are: | 1574 * Possible string values are: |
| 1576 * - "DEFAULT" | 1575 * - "DEFAULT" |
| 1577 * - "EVENTUAL" | 1576 * - "EVENTUAL" |
| 1578 * - "STRONG" | 1577 * - "STRONG" |
| 1579 */ | 1578 */ |
| 1580 core.String readConsistency; | 1579 core.String readConsistency; |
| 1581 /** The transaction to use. Optional. */ | 1580 /** The transaction to use. Optional. */ |
| 1582 core.String transaction; | 1581 core.String transaction; |
| 1583 core.List<core.int> get transactionAsBytes { | 1582 core.List<core.int> get transactionAsBytes { |
| 1584 return crypto.CryptoUtils.base64StringToBytes(transaction); | 1583 return convert.BASE64.decode(transaction); |
| 1585 } | 1584 } |
| 1586 | 1585 |
| 1587 void set transactionAsBytes(core.List<core.int> _bytes) { | 1586 void set transactionAsBytes(core.List<core.int> _bytes) { |
| 1588 transaction = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); | 1587 transaction = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll(
"+", "-"); |
| 1589 } | 1588 } |
| 1590 | 1589 |
| 1591 ReadOptions(); | 1590 ReadOptions(); |
| 1592 | 1591 |
| 1593 ReadOptions.fromJson(core.Map _json) { | 1592 ReadOptions.fromJson(core.Map _json) { |
| 1594 if (_json.containsKey("readConsistency")) { | 1593 if (_json.containsKey("readConsistency")) { |
| 1595 readConsistency = _json["readConsistency"]; | 1594 readConsistency = _json["readConsistency"]; |
| 1596 } | 1595 } |
| 1597 if (_json.containsKey("transaction")) { | 1596 if (_json.containsKey("transaction")) { |
| 1598 transaction = _json["transaction"]; | 1597 transaction = _json["transaction"]; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1632 _json["kind"] = kind; | 1631 _json["kind"] = kind; |
| 1633 } | 1632 } |
| 1634 return _json; | 1633 return _json; |
| 1635 } | 1634 } |
| 1636 } | 1635 } |
| 1637 | 1636 |
| 1638 class RollbackRequest { | 1637 class RollbackRequest { |
| 1639 /** The transaction identifier, returned by a call to beginTransaction. */ | 1638 /** The transaction identifier, returned by a call to beginTransaction. */ |
| 1640 core.String transaction; | 1639 core.String transaction; |
| 1641 core.List<core.int> get transactionAsBytes { | 1640 core.List<core.int> get transactionAsBytes { |
| 1642 return crypto.CryptoUtils.base64StringToBytes(transaction); | 1641 return convert.BASE64.decode(transaction); |
| 1643 } | 1642 } |
| 1644 | 1643 |
| 1645 void set transactionAsBytes(core.List<core.int> _bytes) { | 1644 void set transactionAsBytes(core.List<core.int> _bytes) { |
| 1646 transaction = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); | 1645 transaction = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll(
"+", "-"); |
| 1647 } | 1646 } |
| 1648 | 1647 |
| 1649 RollbackRequest(); | 1648 RollbackRequest(); |
| 1650 | 1649 |
| 1651 RollbackRequest.fromJson(core.Map _json) { | 1650 RollbackRequest.fromJson(core.Map _json) { |
| 1652 if (_json.containsKey("transaction")) { | 1651 if (_json.containsKey("transaction")) { |
| 1653 transaction = _json["transaction"]; | 1652 transaction = _json["transaction"]; |
| 1654 } | 1653 } |
| 1655 } | 1654 } |
| 1656 | 1655 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1775 */ | 1774 */ |
| 1776 class Value { | 1775 class Value { |
| 1777 /** A blob key value. */ | 1776 /** A blob key value. */ |
| 1778 core.String blobKeyValue; | 1777 core.String blobKeyValue; |
| 1779 /** | 1778 /** |
| 1780 * A blob value. May be a maximum of 1,000,000 bytes. When indexed is true, | 1779 * A blob value. May be a maximum of 1,000,000 bytes. When indexed is true, |
| 1781 * may have at most 500 bytes. | 1780 * may have at most 500 bytes. |
| 1782 */ | 1781 */ |
| 1783 core.String blobValue; | 1782 core.String blobValue; |
| 1784 core.List<core.int> get blobValueAsBytes { | 1783 core.List<core.int> get blobValueAsBytes { |
| 1785 return crypto.CryptoUtils.base64StringToBytes(blobValue); | 1784 return convert.BASE64.decode(blobValue); |
| 1786 } | 1785 } |
| 1787 | 1786 |
| 1788 void set blobValueAsBytes(core.List<core.int> _bytes) { | 1787 void set blobValueAsBytes(core.List<core.int> _bytes) { |
| 1789 blobValue = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); | 1788 blobValue = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+
", "-"); |
| 1790 } | 1789 } |
| 1791 /** A boolean value. */ | 1790 /** A boolean value. */ |
| 1792 core.bool booleanValue; | 1791 core.bool booleanValue; |
| 1793 /** A timestamp value. */ | 1792 /** A timestamp value. */ |
| 1794 core.DateTime dateTimeValue; | 1793 core.DateTime dateTimeValue; |
| 1795 /** A double value. */ | 1794 /** A double value. */ |
| 1796 core.double doubleValue; | 1795 core.double doubleValue; |
| 1797 /** | 1796 /** |
| 1798 * An entity value. May have no key. May have a key with an incomplete key | 1797 * An entity value. May have no key. May have a key with an incomplete key |
| 1799 * path. May have a reserved/read-only key. | 1798 * path. May have a reserved/read-only key. |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1902 } | 1901 } |
| 1903 if (meaning != null) { | 1902 if (meaning != null) { |
| 1904 _json["meaning"] = meaning; | 1903 _json["meaning"] = meaning; |
| 1905 } | 1904 } |
| 1906 if (stringValue != null) { | 1905 if (stringValue != null) { |
| 1907 _json["stringValue"] = stringValue; | 1906 _json["stringValue"] = stringValue; |
| 1908 } | 1907 } |
| 1909 return _json; | 1908 return _json; |
| 1910 } | 1909 } |
| 1911 } | 1910 } |
| OLD | NEW |